package com.cloudcc.mobile.entity.approval;

import java.io.Serializable;

import org.json.JSONObject;

public class ApprovalModel implements Serializable {
	/**
	 * lhy(审批model)
	 */
	private static final long serialVersionUID = 8646397408977058176L;
	private String approval_name;// 审批状态名称
	private String date;// 日期
	private String type;// 状态
	private String allocationed_man;// 被分配人
	private String approval_man;// 实际审批人
	private String note;// 注释
	private String whole_type;// 整体状态
	private String id;//

	public String getApproval_name() {
		return approval_name;
	}

	public void setApproval_name(String approval_name) {
		this.approval_name = approval_name;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAllocationed_man() {
		return allocationed_man;
	}

	public void setAllocationed_man(String allocationed_man) {
		this.allocationed_man = allocationed_man;
	}

	public String getApproval_man() {
		return approval_man;
	}

	public void setApproval_man(String approval_man) {
		this.approval_man = approval_man;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getWhole_type() {
		return whole_type;
	}

	public void setWhole_type(String whole_type) {
		this.whole_type = whole_type;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public ApprovalModel transFromJson(JSONObject jo) {
		if (jo == null) {
			return this;
		}
		// approval_name,date,type,allocationed_man,approval_man,note,whole_type
		this.approval_name = jo.optString("approval_name");
		this.date = jo.optString("date");
		;
		this.type = jo.optString("type");
		this.allocationed_man = jo.optString("allocationed_man");
		this.approval_man = jo.optString("approval_man");
		this.note = jo.optString("note");
		this.whole_type = jo.optString("whole_type");
		this.id = jo.optString("id");
		return this;
	}

	public ApprovalModel(String approval_name, String date, String type,
			String allocationed_man, String approval_man, String note,
			String whole_type, String id) {
		super();
		this.approval_name = approval_name;
		this.date = date;
		this.type = type;
		this.allocationed_man = allocationed_man;
		this.approval_man = approval_man;
		this.note = note;
		this.whole_type = whole_type;
		this.id = id;
	}

	public ApprovalModel() {
		super();
	}
}
